package com.sky.utils;


import com.sky.entity.Blog;
import com.sky.entity.ManageBlog;

public class BlogConverter {


    public static ManageBlog fromBlog(Blog blog) {

        ManageBlog manageBlog = new ManageBlog();
        manageBlog.setCategory(String.valueOf(blog.getCategoryId()));
        manageBlog.setContent(blog.getContent());
        manageBlog.setTags(blog.getTags());
        manageBlog.setImageUrls(blog.getCover());
        manageBlog.setCreateTime(blog.getCreateTime());
        manageBlog.setTitle(blog.getTitle());
        manageBlog.setPostId(String.valueOf(blog.getId()));
         manageBlog.setUpdateTime(blog.getUpdateTime());
         manageBlog.setUserId(String.valueOf(blog.getCreateUser()));

        return manageBlog;

    }
}
